<?php
session_start();

if (! isset($_GET['name']) || ! isset($_SESSION['username'])) {
    header("Location: http://" . $_SERVER['HTTP_HOST'] . rtrim(dirname($_SERVER['PHP_SELF']), '/\\') . "/login.php");
    exit();
}elseif (isset($_GET['name'])) {
    if (isset($_SESSION['username'])){
        if ($_GET['name']==$_SESSION['username']){
            
        }
    }else {
        header("Location: http://" . $_SERVER['HTTP_HOST'] . rtrim(dirname($_SERVER['PHP_SELF']), '/\\') . "/login.php");
        exit();
    }
}
?>